<template>
  <h2>Day2作业</h2>
  <br>
  <p v-for="em in dd">
  姓名:{{ em.name }},
  年龄:{{ em.age
    
  }}</p>
  <br>


  <Table border="1">
    <thead>
      <tr  style="background-color: aqua;">
        <td>用户借款编号</td>
        <td>借款用户账号</td>
        <td>借款款项名称</td>
        <td>借款金额</td>
        <td>剩余还款本金</td>
        <td>操作</td>
      </tr>
    </thead>
    <tbody>
      <tr v-for="em in info" :key="em.id">
        <td>{{ em.id }}</td>
        <td>{{ em.zhanghao }}</td>
        <td>{{ em.name }}</td>
        <td>{{ em.price }}</td>
        <td>{{ em.price2 }}</td>
        <td><input type="button" value="删除" @click="shanchu(em.id)"></td>
      </tr>
    </tbody>
  </Table>

<p>{{ book }}</p>
 
</template>
<script setup lang="ts">
import { ref } from 'vue';
const dd=ref([{
  name:"张三",
  age:18,
}
,{
  name:"李四",
  age:20,
},
{
  name:"王五",
  age:22,
}
,{
  name:"赵六",
  age:24,
}
])
const info=ref([{
  id:1,
  zhanghao:"zhangsan",
  name:"八维助学金",
  price:"400",
  price2:"0"
},{
  id:2,
  zhanghao:"张三",
  name:"八维助学金",
  price:"10000",
  price2:"10000"
}

])

let  book = [
  {id:1,name:'foreword', pageCount: 14},
  {id:2,name:'boyWhoLived', pageCount: 18},
  {id:3,name:'vanishingGlass', pageCount: 13},
  {id:4,name:'lettersFromNoOne', pageCount: 17},
  {id:5,name:'afterword', pageCount: 19}
];

//删除
const shanchu=(id:any)=>{
  alert("删除成功")
}





</script>



<style scoped>

</style>
